<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../../inc/conn.asp"-->
<!--#include file="../common/u.asp"-->
<%links="personal"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人资料</title>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.tabs.js"></script>
</head>
<body>




<!--#include file="../../common/top.asp"-->







<div class="fullwidth">
	<div class="place ">
		<a href="/">首页</a> &gt; <a href="/user">会员中心</a> &gt; 个人资料
	</div>
</div>
<!--main-->
<div class="fullwidth bg1">
	<div class="main">
		
		
        
        <!--#include file="../common/left.asp"-->
        
        
		
		<div class="right_show f_r">
			
			<div class="title_4">
				<h2>个人资料</h2><div></div>
			</div>
			<div class="reg_box reg_s_1 account order_tab order_tab_3">
				<ul class="tab_menu">
					<li class="current">基本资料</li>
					<li><a href="/user/address">地址管理</a></li>
				</ul>
				<div class="tab_box">
					<div>						
						<p class="tip tip_3">密码，邮箱，手机号码请在账户设置中修改。</p>
						<div class="clear20"></div>
						<form name="formreg" action="" method="post" class="form_table_1">
						<table class="stable stable_1 stable_5">
							<tr>
								<td class="select_td_1">用户名</td>
								<td><input name="username" type="text" class="text" id="username" value="<%=username%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1">姓名</td>
								<td><input name="name" type="text" class="text" id="name" value="<%=name%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1">性别</td>
								<td><input name="sex" type="radio" id="radio" value="男"<%if sex="男" then response.Write " checked"%> />
								  男
							      <input type="radio" name="sex" id="radio" value="女"<%if sex="女" then response.Write " checked"%> />
							      女</td>
							</tr>
							<tr>
								<td class="select_td_1">生日</td>
								<td><input name="Birth" type="text" class="text" id="Birth" value="<%=Birth%>" /></td>
							</tr>
							<tr>
							  <td class="select_td_1">手机</td>
							  <td><input name="mobile" type="text" class="text" id="mobile" value="<%=mobile%>" /></td>
						  </tr>
							<tr>
								<td class="select_td_1">QQ</td>
								<td><input name="qq" type="text" class="text" id="qq" value="<%=qq%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1">旺旺</td>
								<td><input name="wangwang" type="text" class="text" id="wangwang" value="<%=wangwang%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1">开通服务</td>
								<td>
								<input type="checkbox" name="Yservice" value="1" <%if Yservice=true then response.Write " checked"%> />YAHOO代拍&nbsp;&nbsp;&nbsp;&nbsp;
									<input name="AService" type="checkbox" id="AService" value="1" <%if AService=true then response.Write " checked"%> />日本代购&nbsp;&nbsp;&nbsp;&nbsp;
									<input name="Tservice" type="checkbox" id="Tservice" value="1" <%if Tservice=true then response.Write " checked"%> />日本转运&nbsp;&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
							<tr>
								<td class="select_td_1"><p class="line150">关键字1</p><p class="red line150">Yahoo竞拍搜索使用</p></td>
								<td><input name="key" type="text" class="text text_1" id="key" value="<%=key%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1"><p class="line150">关键字2</p><p class="red line150">Yahoo竞拍搜索使用</p></td>
								<td><input name="key2" type="text" class="text text_1" id="key2" value="<%=key2%>" /></td>
							</tr>
							<tr>
								<td class="select_td_1"><p class="line150">关键字3</p><p class="red line150">Yahoo竞拍搜索使用</p></td>
								<td><input name="key3" type="text" class="text text_1" id="key3" value="<%=key3%>" /></td>
							</tr>
						</table>
						<div class="clear20"></div>
						<div class="btn">
							<a href="#" onclick="formreg.submit()" class="btn_16">保存</a>
                            <input type="hidden" name="t" value="y" />
						</div>
						</form>
						<div class="clear20"></div>
						<div class="clear20"></div>
					</div>
									
					
				</div>
				<div class="clear20"></div>
				<div class="clear20"></div>
			</div>	
			
		</div>
		
		
	</div>
</div>

<div class="clear"></div>



<!--#include file="../../common/footer.asp"-->




</body>
</html>
<%if request.Form("t")="y" then
uname=checkstr(inHTML(request.Form("username")))
name=checkstr(inHTML(request.Form("name")))
sex=checkstr(inHTML(request.Form("sex")))
Birth=checkstr(inHTML(request.Form("Birth")))
umobile=checkstr(inHTML(request.Form("mobile")))
qq=checkstr(inHTML(request.Form("qq")))
Yservice=checkstr(inHTML(request.Form("Yservice")))
AService=checkstr(inHTML(request.Form("AService")))
Tservice=checkstr(inHTML(request.Form("Tservice")))
key=checkstr(inHTML(request.Form("key")))
key2=checkstr(inHTML(request.Form("key2")))
key3=checkstr(inHTML(request.Form("key3")))
if Yservice="" then Yservice=0
if AService="" then AService=0
if Tservice="" then Tservice=0

if uname="" then
response.write"<script>alert('用户名不能为空');</script>"
response.write"<script>window.history.back(-1);</script>"
response.end
end if


set rsx=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&uname&"' and username<>'"&username&"'"
rsx.open sql,conn,1,3
if not rsx.eof then
response.write"<script>alert('用户名已被使用');</script>"
response.write"<script>window.history.back(-1);</script>"
response.end
else

if umobile<>"" then
set rsx=server.createobject("adodb.recordset")
sql="select * from [user] where mobile='"&umobile&"' and mobile<>'"&mobile&"'"
rsx.open sql,conn,1,3
if not rsx.eof then
response.write"<script>alert('手机已被使用');</script>"
response.write"<script>window.history.back(-1);</script>"
response.end
end if
end if

set rsx=server.createobject("adodb.recordset")
sql="select * from [user] where mail='"&mail&"'"
rsx.open sql,conn,1,3
rsx("username")=uname
rsx("name")=name
rsx("sex")=sex
if Birth<>"" then rsx("Birth")=Birth
rsx("qq")=qq
rsx("mobile")=umobile
rsx("Yservice")=Yservice
rsx("AService")=AService
rsx("Tservice")=Tservice
rsx("key")=key
rsx("key2")=key2
rsx("key3")=key3
rsx.update
response.cookies("u")("mail")=rsx("mail")
response.cookies("u")("username")=rsx("username")
response.cookies("u")("Password")=rsx("Password")
response.cookies("u")("uid")=rsx("uid")
dim ctime
ctime=5256000
ctime=dateadd("n",ctime,now())
response.cookies("u").expires=ctime
response.write"<script language=JavaScript>{window.alert('保存成功');window.location.href='/user/personal';}</script>"
rsx.close
set rsx=nothing
end if
end if
%>

